<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="你的js文件目录"></script>
</head>
<script>
    let arrName=["周杰伦","陈奕迅","林俊杰","薛之谦","文    章","李连杰","胡    歌",];
    let arrAge=["10","32","24","12","18","32","32"];
    let arrGender=["男","男","女","女","男","女","男","女"];
    onload=()=>{
        let table = document.createElement("table");
        //第一行
        let tr = document.createElement("tr");
        let th = document.createElement("th");
        th.innerHTML = "序号";
        tr.appendChild(th);
        th = document.createElement("th");
        th.innerHTML = "姓名";
        tr.appendChild(th);
        th = document.createElement("th");
        th.innerHTML = "年龄";
        tr.appendChild(th);
        th = document.createElement("th");
        th.innerHTML = "性别";
        tr.appendChild(th);
        table.appendChild(tr);
        //第2345行
        for(let i =0;i<arrName.length;i++){
            let tr = document.createElement("tr");
            //1 col
            th = document.createElement("th");
            th.innerHTML=i+1;
            tr.appendChild(th);
            //2 col
            th = document.createElement("th");
            th.innerHTML=arrName[i];
            tr.appendChild(th);
            table.appendChild(tr);
            //3 col
            th = document.createElement("th");
            th.innerHTML=arrAge[i];
            tr.appendChild(th);
            //4 col
            th = document.createElement("th");
            th.innerHTML=arrGender[i];
            tr.appendChild(th);
        }
        document.body.appendChild(table)
    }
</script>
<body>

</body>
</html>